function cbShowFFTROI_Checked(cb, e)
%CBSHOWFFT_CHECKED Summary of this function goes here
%   Detailed explanation goes here

    handles= guihandles(cb);
    
    h = uipreview_GetImage;
    h_rect= getappdata(h, 'FFTROIHandle');
    set(h_rect, 'visible', 'on');

    IsChecked= get(handles.cbShowFFT, 'value');
    if IsChecked
        tb=handles.tbEditFFTROI;
        PreviewIsRunning = getappdata(tb, 'PreviewIsRunning');
        if isempty(PreviewIsRunning) || ~PreviewIsRunning
            set(tb, 'enable', 'on');
        end
    else
        set(handles.tbEditFFTROI, 'enable', 'off');
    end
end

